import request from '@utils/request'
//自己赋值新的baseURL
// import {createService} from '@utils/request'
// const request = createService(baseurl)

//获取考核单预览列表
export const getKHYLlist = (data) => {
    return request.get(`/api/Performance/getPerformanceListdisplay?page=${data.pageNo}&pagesize=${data.pageSize}`)
}

//获取考核单月份列表
export const getKHlist = (data) => {
    return request.get(`/api/Performance/getPerformanceCreateList?page=${data.pageNo}&pagesize=${data.pageSize}`)
}
//获取考核锁定月份列表
export const getSDlist = (data) => {
    return request.get(`/api/Performance/getPerformanceLockList?page=${data.pageNo}&pagesize=${data.pageSize}`)
}

//一键生成考核单
export const createReview = (data) => {
    return request.get(`/api/task/createReviewResult?month=${data}`)
}
//一键锁定考核内容
export const lockReivewResult = (data) => {
    return request.get(`/api/task/lockReivewResult?month=${data}`)
}
//根据当前人uid（为用户信息中的review_id字段）获取被考核人列表
export const viewedList = (data) => {
    return request.post(`/api/PerOrgPeople/findreviewedpeoplelist`, data)
}
//根据当前考核人uid获取考核单
export const viewedFrom = (data) => {
    return request.post(`/api/PerOrgPeople/findreviewedpeoplefrom`, data)
}
//设置被考核人当前考核项的分值
export const setSpotScore = (data) => {
    return request.post(`/api/PerOrgPeople/setSpotScore`, data)
}
//项目总览列表（我的绩效列表）
export const overviewList = (data) => {
    return request.get(`/api/PerOrgPeople/scoreSort?uid=${data.uid}&month=${data.month}`)
}
//我的绩效列表~获取个人考核列表
export const getPerviewList = (data) => {
    return request.get(`/api/PerOrgPeople/getPeopleReviewResultList?uid=${data.uid}&month=${data.month}`)
}
//查询项目类型的分数
export const selectLevlScore = (data) => {
    return request.post(`/api/PerOrgPeople/selectLevlScore`, data)
}
//根据项目id查询项目成员列表
export const projectTeamList = (data) => {
    return request.post(`/api/PerOrgPeople/projectTeamList`, data)
}
//项目成员考核成绩列表
export const teamReviewList = (data) => {
    return request.post(`/api/PerOrgPeople/projectTeamReviewList`, data)
}
//项目成员考核成绩添加
export const teamReviewAdd = (data) => {
    return request.post(`/api/PerOrgPeople/projectTeamReviewAdd`, data)
}
//项目成员考核成绩删除
export const teamReviewDel = (data) => {
    return request.get(`/api/PerOrgPeople/projectTeamReviewDel?id=${data}`)
}
//项目成员考核成绩删除
export const getProjectTeamersScore = (data) => {
    return request.post(`/api/PerOrgPeople/selectProjectTeamersScore`, data)
}

export default {
    getKHYLlist,
    getKHlist,
    getSDlist,
    createReview,
    lockReivewResult,
    viewedList,
    viewedFrom,
    setSpotScore,
    overviewList,
    getPerviewList,
    selectLevlScore,
    projectTeamList,
    teamReviewList,
    teamReviewAdd,
    teamReviewDel,
    getProjectTeamersScore
}